package com.jxd.project.absence.vo;

import lombok.Data;

import java.util.Arrays;

/**
 * @ClassName UserInfo
 * @Description TODO
 * @Author 李杨
 * @Date 2025/10/7 23:23
 * @Version 1.0
 */
@Data
public class UserInfo {
    private String userid;
    private int empno;
    private String ename;
    private int deptno;
    private Integer[] roleid;

    public void setRoleid(String roleidStr) {
        if (roleidStr != null && !roleidStr.isEmpty()) {
            this.roleid = Arrays.stream(roleidStr.split(","))
                    .map(Integer::valueOf)
                    .toArray(Integer[]::new);
        } else {
            this.roleid = new Integer[0];
        }
    }
}
